home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 1995 #5 & #6 / Amiga Plus CD - 1995 - No. 5 and 6.iso / tex / mf / inputs / dc / dxaccent.mf < prev    next >
Text File  |  1994-04-12  |  9KB  |  233 lines

  1. % This is DXACCENT.MF in text format, as of March 24, 1992
  2. %
  3. % DC fonts Version 1.1 (prerelease of EC fonts)
  4. %
  5. %          [ heavily borrowed from the Computer Modern Roman family of
  6. %            fonts by D. E. Knuth ]
  7. %
  8. % Content:
  9. %
  10. % Accents
  11. %
  12.  
  13. dcchar"Scandinavian circle accent";
  14. beginchar(oct"006",13u#+4/3(asc_height#-x_height#)*slant,asc_height#,0);
  15. adjust_fit(cap_serif_fit#,cap_serif_fit#);
  16. numeric circ_hair,circ_vair;
  17. circ_hair=hround min(hair,u+.5); circ_vair=vround min(vair,(h-x_height)/6+.5);
  18. penpos1(circ_vair,90); penpos3(circ_vair,-90);
  19. penpos2(circ_hair,180); penpos4(circ_hair,0);
  20. x2r=hround(.5w-1.5u-.5circ_hair);
  21. x4r=w-x2r; x1=x3=.5w; y1r=h+apex_o; y2=y4=.5[y1,y3];
  22. y3r=vround(1/3[x_height,h]+apex_o);
  23. penstroke pulled_arc.e(1,2) & pulled_arc.e(2,3)
  24.  & pulled_arc.e(3,4) & pulled_arc.e(4,1) & cycle;  % bowl
  25. penlabels(1,2,3,4); endchar;
  26.  
  27.  
  28. dcchar"Grave accent";
  29. beginchar(oct"0",9u#,min(asc_height#,2x_height#),0);
  30. adjust_fit(0,0);
  31. if serifs: pickup crisp.nib; x1-.5stem=hround 2u; x2=2/3[x1,w-x1];
  32.  y1+.5stem=h+eps; y2=max(2/3[h,x_height],x_height+o+hair);
  33.  numeric theta; theta=angle(z2-z1)+90;
  34.  pos1(stem,theta); pos2(hair,theta);
  35.  filldraw circ_stroke z1e--z2e;  % diagonal
  36. else: pickup fine.nib; pos1(stem,0); pos2(vair,0);
  37.  lft x1l=hround 1.5u; rt x2r=hround(.5w+.25u+.5vair);
  38.  top y1=h; bot y2=vround 2/3[h,x_height];
  39.  filldraw stroke z1e--z2e; fi  % diagonal
  40. penlabels(1,2); endchar;
  41.  
  42. dcchar"Acute accent";
  43. beginchar(oct"1",9u#,min(asc_height#,2x_height#),0);
  44. italcorr h#*slant-if serifs: 1.5 fi u#;
  45. adjust_fit(0,0);
  46. if serifs: pickup crisp.nib; x1+.5stem=hround(w-2u); x2=2/3[x1,w-x1];
  47.  y1+.5stem=h+eps; y2=max(2/3[h,x_height],x_height+o+hair);
  48.  numeric theta; theta=angle(z2-z1)+90;
  49.  pos1(stem,theta); pos2(hair,theta);
  50.  filldraw circ_stroke z1e--z2e;  % diagonal
  51. else: pickup fine.nib; pos1(stem,0); pos2(vair,0);
  52.  rt x1r=hround(w-1.5u); lft x2l=hround(.5w-.25u-.5vair);
  53.  top y1=h; bot y2=vround 2/3[h,x_height];
  54.  filldraw stroke z1e--z2e; fi  % diagonal
  55. penlabels(1,2); endchar;
  56.  
  57. dcchar"Hachek (check) accent";
  58. beginchar(oct"007",9u#,.75[x_height#,min(asc_height#,2x_height#)],0);
  59. h':=vround min(asc_height,2x_height); % height of circumflex being inverted
  60. if serifs: italcorr h#*slant+.5hair#-1.75u#;
  61.  adjust_fit(0,0);
  62.  pickup crisp.nib; pos2'(.5[vair,curve],90); top y2'r=h;
  63.  pos2(.5[vair,curve],90); x2=.5w;
  64.  x1=w-x3=good.x 2.25u; top y1=top y3=h; y1-y2=.5(y2'-x_height);
  65.  pos1(hair,angle(z2-z1)+90); pos3(hair,angle(z3-z2)+90);
  66.  filldraw stroke z1e--z2e--z3e;  % diagonals
  67. else: italcorr h#*slant-.5stem#+.5vair#-.75u#;
  68.  adjust_fit(0,0);
  69.  pickup fine.nib; pos1(vair,0); pos3(vair,0); x1=w-x3;
  70.  pos2(stem,0); bot y2=vround(1/12[x_height,h']+o); x2=.5w;
  71.  top y1=top y3=h+o; lft x1l=hround(rt x2r-3.25u-.5vair);
  72.  z0=whatever[z1r,z2r]=whatever[z2l,z3l];
  73.  y4l=y4r=y2; x4l=good.x .2[x2l,x2]; x4r=w-x4l;
  74.  filldraw z4l--z1l--z1r--z0--z3l--z3r--z4r--cycle; fi  % diagonals
  75. penlabels(0,1,2,3,4); endchar;
  76.  
  77. dcchar"Breve accent";
  78. beginchar(oct"10",9u#,min(asc_height#,2x_height#),0);
  79. italcorr h#*slant+.5vair#-1.5u#;
  80. adjust_fit(0,0);
  81. pickup crisp.nib; pos1(vair,-180); pos3(vair,0);
  82. top y1=top y3=h; lft x1r=w-rt x3r=hround(2u-.5vair);
  83. numeric mid_thickness; mid_thickness=vround 1/3[vair,stem];
  84. pos2(mid_thickness,-90); x2=.5w;
  85. bot y2r=vround max(x_height+o+tiny,1/3[x_height,h]+o-.5mid_thickness);
  86. filldraw stroke z1e{down}...z2e{right}...{up}z3e;  % stroke
  87. penlabels(1,2,3); endchar;
  88.  
  89. dcchar"Macron (bar) accent";
  90. numeric macron_breadth#; macron_breadth#=.2[vair#,stem#];
  91. beginchar(oct"011",9u#,.4[x_height#,asc_height#]+macron_breadth#,0);
  92. italcorr h#*slant-.75u#;
  93. adjust_fit(0,0);
  94. numeric macron_breadth; macron_breadth:=Vround .2[vair,stem];
  95. pickup if serifs: crisp.nib else: fine.nib fi;
  96. pos1(macron_breadth,90); pos2(macron_breadth,90);
  97. top y1r=top y2r=h+o; lft x1=w-rt x2=hround 1.25u;
  98. filldraw stroke z1e--z2e;  % bar
  99. penlabels(1,2); endchar;
  100.  
  101.  
  102. dcchar"Cedilla accent";
  103. beginchar(oct"013",8u#,0,.875desc_depth#);
  104. adjust_fit(0,0);
  105. x1=.5w+.5u;
  106. if serifs: pickup crisp.nib; pos1(stem,0); pos2(stem,0);
  107.  pos3(vair,90); pos4(stem,0); pos5(vair,-90);
  108.  x1=x2; z3l=z2l; x4=x2+1.5u; x5=x3-1.5u;
  109.  bot y1=-o; bot y2=-vround 2/7d-o; y4=.5[y3,y5]; bot y5=-d-o;
  110.  filldraw stroke z1e--z2e;  % stem
  111.  filldraw stroke z3e{right}...z4e{down}...{left}z5e;  % hook
  112. else: pickup fine.nib; pos1(vair,0); top y1=-o-2;
  113.  pos2(.5[vair,stem],0); bot y2=-d-o; x2=x1-1.25u;
  114.  filldraw stroke z1e--z2e; fi  % diagonal
  115. penlabels(1,2,3,4,5); endchar;
  116.  
  117. dcchar"Circumflex (hat) accent";
  118. beginchar(oct"002",9u#,min(asc_height#,2x_height#),0);
  119. if serifs: italcorr .5[x_height#,h#]*slant+.5hair#-1.75u#;
  120.  adjust_fit(0,0);
  121.  pickup crisp.nib; pos2(.5[vair,curve],90); top y2r=h; x2=.5w;
  122.  x1=w-x3=good.x 2.25u; y1=y3=.5[x_height,y2];
  123.  pos1(hair,angle(z2-z1)+90); pos3(hair,angle(z3-z2)+90);
  124.  filldraw stroke z1e--z2e--z3e;  % diagonals
  125. else: italcorr 2/3[x_height#,h#]*slant-.5stem#+.5vair#-.75u#;
  126.  adjust_fit(0,0);
  127.  pickup fine.nib; pos1(vair,0); pos3(vair,0); x1=w-x3;
  128.  pos2(stem,0); top y2=h; x2=.5w; bot y1=bot y3=vround 2/3[h,x_height]-eps;
  129.  lft x1l=hround(rt x2r-3.25u-.5vair); % same slope as in the acute accent
  130.  z0=whatever[z1r,z2r]=whatever[z2l,z3l];
  131.  y4l=y4r=y2; x4l=good.x .2[x2l,x2]; x4r=w-x4l;
  132.  filldraw z4l--z1l--z1r--z0--z3l--z3r--z4r--cycle; fi  % diagonals
  133. penlabels(0,1,2,3,4); endchar;
  134.  
  135. dcchar"Dot accent";
  136. numeric dot_diam#; dot_diam#=max(dot_size#,cap_curve#);
  137. beginchar(oct"012",5u#,min(asc_height#,10/7x_height#+.5dot_diam#),0);
  138. define_whole_blacker_pixels(dot_diam);
  139. italcorr h#*slant+.5dot_diam#-2u#;
  140. adjust_fit(0,0);
  141. pickup tiny.nib; pos1(dot_diam,0); pos2(dot_diam,90);
  142. x1=x2=.5w; top y2r=h+1;
  143. if bot y2l<x_height+o+slab: y2l:=min(y2r-eps,x_height+o+slab+.5tiny); fi
  144. y1=.5[y2l,y2r]; dot(1,2);  % dot
  145. penlabels(1,2); endchar;
  146.  
  147. dcchar"Long Hungarian umlaut accent";
  148. beginchar(oct"005",9u#,min(asc_height#,2x_height#),0);
  149. italcorr h#*slant-u#;
  150. adjust_fit(0,0);
  151. x3-x1=x4-x2=hround 3u; y3=y1; y4=y2;
  152. if serifs: pickup crisp.nib; x3+.5stem=hround(w-1.5u); x2=2.5u;
  153.  y1+.5stem=h; y2=max(2/3[h,x_height],x_height+o+hair);
  154.  numeric theta; theta=angle(z2-z1)+90;
  155.  pos1(stem,theta); pos2(hair,theta);
  156.  pos3(stem,theta); pos4(hair,theta);
  157.  filldraw circ_stroke z1e--z2e;  % left diagonal
  158.  filldraw circ_stroke z3e--z4e;  % right diagonal
  159. else: pickup fine.nib; pos1(stem,0); pos2(vair,0);
  160.  pos3(stem,0); pos4(vair,0);
  161.  rt x3r=hround(w-1.5u); lft x4l=hround(.5w+u-.5vair);
  162.  top y1=h; bot y2=vround 2/3[h,x_height];
  163.  filldraw stroke z1e--z2e;  % left diagonal
  164.  filldraw stroke z3e--z4e; fi  % right diagonal
  165. penlabels(1,2,3,4); endchar;
  166.  
  167. dcchar"Tilde (squiggle) accent";
  168. beginchar(oct"003",9u#,min(asc_height#,10/7x_height#+.5dot_size#),0);
  169. italcorr h#*slant-u#;
  170. adjust_fit(0,0);
  171. if serifs: numeric theta; theta=angle(1/6(6u-vair),1/4(h-x_height));
  172.  pickup crisp.nib; numeric mid_width; mid_width=.4[vair,stem];
  173.  pos1(vair,theta+90); pos2(vair,theta+90);
  174.  pos3(vair,theta+90); pos4(vair,theta+90);
  175.  z2-z1=z4-z3=(mid_width-crisp)*dir theta;
  176.  lft x1r=w-rt x4l=hround 1.5u; top y4r=h;
  177.  bot y1l=vround(bot y1l+min(2/3[x_height,h],y3l-.25vair)-top y1r);
  178.  pair delta; ypart delta=3(y3l-y1l); delta=whatever*dir theta;
  179.  filldraw z1l..controls(z1l+delta)and(z3l-delta)..z3l..z4l
  180.   --z4r..controls(z4r-delta)and(z2r+delta)..z2r..z1r--cycle;  % stroke
  181. else: pickup fine.nib; pos1(vair,180); pos2(vair,90);
  182.  pos3(.5[vair,slab],90); pos4(vair,90); pos5(vair,180);
  183.  lft x1r=w-rt x5l=hround 1.5u; x2-x1=x3-x2=x4-x3=x5-x4;
  184.  bot y1=bot y4l=vround(.75[x_height,h]-vair);
  185.  top y2r=top y5=h; y3=.5[y2,y4];
  186.  filldraw stroke z1e{up}...z2e{right}..z3e..{right}z4e...{up}z5e; fi % stroke
  187. penlabels(1,2,3,4,5); endchar;
  188.  
  189. dcchar"Umlaut (double dot) accent";
  190. numeric dot_diam#,dot_diam;
  191. dot_diam#=max(dot_size#,cap_curve#);
  192. beginchar(oct"004",9u#,min(asc_height#,10/7x_height#+.5dot_diam#),0);
  193. dot_diam=max(tiny.breadth,hround(max(dot_size,cap_curve)-2stem_corr));
  194. italcorr h#*slant+.5dot_diam#-2.25u#;
  195. adjust_fit(0,0);
  196. pickup tiny.nib; pos1(dot_diam,0); pos2(dot_diam,90);
  197. x1=x2=2.75u; top y2r=h+1;
  198. if bot y2l<x_height+o+slab: y2l:=min(y2r-eps,x_height+o+slab+.5tiny); fi
  199. y1=.5[y2l,y2r]; dot(1,2);  % left dot
  200. pos3(dot_diam,0); penpos4(y2r-y2l,90); y3=y4=y1; x3=x4=w-x1;
  201. dot(3,4);  % right dot
  202. penlabels(1,2,3,4); endchar;
  203.  
  204.  
  205. dcchar"Ogonek";
  206. beginchar(oct"014",5u#,0,desc_depth#);
  207. italcorr 0;
  208. adjust_fit(0,0);
  209. ogon_one   := 1;
  210. ogon_two   := 2;
  211. ogon_three := 3;
  212. if serifs:
  213.  x[ogon_one]r=0.7w;
  214.  %+outer_jut;
  215. else:
  216.  x[ogon_one]r=0.6w;
  217. fi
  218.  pickup crisp.nib;
  219.  pos[ogon_one](
  220.     if 0.9vair>currentbreadth: 0.9vair else: currentbreadth+eps fi,-60);
  221.  pos[ogon_two](stem,0);
  222.  pos[ogon_three](vair,145);
  223.  x[ogon_two]=x[ogon_one]-2.5u if monospace: /expansion_factor fi ;
  224.  x[ogon_three]=x[ogon_one]+0.5u if monospace: /expansion_factor fi;
  225.  bot y[ogon_one]r = 0;
  226.  bot y[ogon_three]=0.5(-d-o);  %0.4
  227.  bot y[ogon_two]=0.5(-d-o);
  228.  filldraw stroke z[ogon_one]e{dir 225}...
  229.    z[ogon_two]e{dir -110}...{dir 60}z[ogon_three]e;  % hook
  230. penlabels(1,2,3); endchar;
  231.  
  232. endinput;
  233.